<%@ page contentType="text/html; charset=utf-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>系统登录</title>

<script src="scripts/boot.js" type="text/javascript"></script> 
</head>
<body>
<body>
 
<br/><br/><br/><br/><br/><br/><br/><br/><br/>        
                
<div id="form1">
    <table align="center" >
        <tr>
            <td><label for="username$text">帐号：</label></td>
            <td>
                <input name="username"  class="mini-textbox" required="true" requiredErrorText="帐号不能为空"/>
                
            </td>    
        </tr>
        <tr>
            <td><label for="pwd$text">密码：</label></td>
            <td>
                <input name="userpwd" class="mini-password" vtype="minLength:5" required="true" minLengthErrorText="密码不能少于5个字符" />

            </td>
        </tr>            
        <tr>
            <td></td>
            <td>
                <input value="Login" type="button" onclick="submitForm()"  />
            </td>
        </tr>
    </table>
</div>
<br/>
<p align="center">&copy; 社保卡管理信息系统</p>


<script type="text/javascript">
        mini.parse();

        function submitForm() {
            
            var form = new mini.Form("#form1");

            form.validate();
            if (form.isValid() == false) return;
			
            //提交数据
            var data = form.getData();      
            var json = mini.encode(data);
          
            $.ajax({
               
                url: "/sbk/login.do?method=login1",
                type: "post",
                data: { submitData: json },
                dataType:"text",
                success: function (res) {
                   	if(res=="1")
                    alert("登录失败，请检查用户名及密码");
                    else window.location.href="main"; 
                }
            });
        }

    </script>
</body>
</html>